package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.AgencyCertificationAudit;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.service.IAgencyCertificationAuditService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author:zhq
 * @Date: 2025/09/17 16:36
 * @Description:
 */
@RestController
@RequestMapping("/operation/agency-certification-audit")
public class OperateAgencyCertificationAuditController {
    @Resource
    private IAgencyCertificationAuditService agencyCertificationAuditService;

    @PostMapping
    public void realNameAuthentication(@RequestBody AgencyCertificationAuditAddReqDTO agencyCertificationAuditAddReqDTO) {
        agencyCertificationAuditService.realNameAuthentication(agencyCertificationAuditAddReqDTO);

    }
    @GetMapping("/page")
    public PageResult<AgencyCertificationAudit> pageQuery(AgencyCertificationAuditPageQueryReqDTO agencyCertificationAuditPageQueryReqDTO) {
        return agencyCertificationAuditService.pageQuery(agencyCertificationAuditPageQueryReqDTO);
    }

    /**
     * 审核认证
     *
     * @param id
     * @param certificationAuditReqDTO
     */
    @PutMapping("/audit/{id}")
    public void auditCertification(@PathVariable("id") String id, CertificationAuditReqDTO certificationAuditReqDTO) {
        agencyCertificationAuditService.auditCertification(id, certificationAuditReqDTO);
    }

}
